<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="./../css/jquery.idcode.css">
    <script src="./../lib/jquery.js"></script>
    <script src="./../lib/jquery.idcode.js"></script>



</head>
<body>

        <input type="text" id ="Txtidcode" class ="txtVerification"><span id="idcode"></span>

        <input type="button" id="butn" value="提交">
        <script>

                $.idcode.setCode();   //加载生成验证码方法
                
                $("#butn").click(function(){
                    var IsBy = $.idcode.validateCode()  //调用返回值，返回值结果为true或者false
                    if(IsBy){
                        alert("验证码输入正确")
                    }else {
                        alert("请重新输入")
                    }
                })
                
                
        </script>

</body>
</html>


